package com.iris.jvmtest.polymorphic;
/**
 * @date : 2017年10月23日 上午11:27:02
 * @author : Iris.Xiao
 * @version : 1.0
 * @description : 
*/
public class Polymorphic {

	public abstract static class Human{
		
	}
	public static class Women extends Human{
		
	}
	public static class Man extends Human{
		
	}
	public void sayHello(Human human){
		System.out.println("human");
	}
	public void sayHello(Women human){
		System.out.println("Women");
	}
	public void sayHello(Man human){
		System.out.println("Man");
	}
	public static void main(String[] args) {
		Polymorphic p = new Polymorphic();
		Human man = new Man();
		Human women = new Women();
		Women women1 = new Women();
		p.sayHello(man);
		p.sayHello(women);
		p.sayHello(women1);
	}
}
